//
//  LBProductCell.m
//  loveBeen
//
//  Created by 郭小双 on 16/11/21.
//  Copyright © 2016年 loveBeen. All rights reserved.
//

#import "LBProductCell.h"
@interface LBProductCell()


@end
@implementation LBProductCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier] )
     
        self = [[[UINib nibWithNibName:@"LBProductCell" bundle:nil]instantiateWithOwner:self options:0]lastObject];
    return self;
}


-(void)setModel:(LBSuperMarketProducts *)model{
    
    self.nameLab.text = model.name;
    
    self.countLab.text = [NSString stringWithFormat:@"x%ld",model.totalCount];
    
    float price = [(model.partner_price) floatValue];
    
    self.priceLab.text = [NSString stringWithFormat:@"¥%.2f",(price * model.totalCount)];
    
    
}











- (void)awakeFromNib {
    [super awakeFromNib];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
